﻿<html>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<head><title>数据库修复程序</title>
<?php
	$con = mysql_connect(SAE_MYSQL_HOST_M.':'.SAE_MYSQL_PORT,SAE_MYSQL_USER,SAE_MYSQL_PASS);
	if(!$con)
	{
	die('Could not connect: ' . mysql_error());
	}
	mysql_select_db(SAE_MYSQL_DB,$con);
	$run = mysql_query("ALTER TABLE `sae_home_album` CHANGE `pic` `pic` VARCHAR( 360 ) NOT NULL DEFAULT '';");
	if($run)
	{
		echo "修复家园相册成功！";
	}
	else
	{
		die("修复出错！" . mysql_error());
	}
	$run = mysql_query("update `sae_common_plugin` set `modules` ='a:4:{i:1;a:10:{s:4:\"name\";s:7:\"connect\";s:4:\"menu\";s:0:\"\";s:3:\"url\";s:0:\"\";s:4:\"type\";s:2:\"11\";s:7:\"adminid\";s:1:\"0\";s:12:\"displayorder\";s:1:\"0\";s:8:\"navtitle\";s:0:\"\";s:7:\"navicon\";s:0:\"\";s:10:\"navsubname\";s:0:\"\";s:9:\"navsuburl\";s:0:\"\";}i:2;a:10:{s:4:\"name\";s:7:\"spacecp\";s:4:\"menu\";s:8:\"QQ绑定\";s:3:\"url\";s:0:\"\";s:4:\"type\";s:1:\"7\";s:7:\"adminid\";s:1:\"0\";s:12:\"displayorder\";s:1:\"0\";s:8:\"navtitle\";s:0:\"\";s:7:\"navicon\";s:0:\"\";s:10:\"navsubname\";s:0:\"\";s:9:\"navsuburl\";s:0:\"\";}s:6:\"system\";i:2;s:5:\"extra\";a:2:{s:11:\"installtype\";s:0:\"\";s:10:\"langexists\";i:1;}}' where `identifier`='qqconnect';");
	if($run)
	{
		echo "修复家园相册成功！";
	}
	else
	{
		die("修复出错！" . mysql_error());
	}
?>
